package getSystemInfo;

import java.util.Iterator;
import java.util.Properties;
import java.util.Set;

/**
 * @author 陈鹏
 * 获取系统的环境变量，properties一般用来整配置文件，用得比较多
 */
public class Example {
    public static void main(String[] args) {
        Properties properties=System.getProperties();
        Set set=properties.keySet();
        Iterator it=set.iterator();
        while (it.hasNext()){
            String key=(String) it.next();
            String value=properties.getProperty(key);
            System.out.println(key+"=="+value);
        }
    }
}
